<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>提取现金</title>
<style type="text/css">
	#yjc{
		width: 400px;
		height: 240px;
		margin: 0px;
		padding: 30px 0;
	}
	#xpz{
		margin-top: 80px;
	}
	body{
		background-color:#FFF5EE;
	}
</style>
<script type="text/javascript"></script>
<script type="text/javascript">
	function yanz(){
		var a = document.forms["myForm"]["money"].value;
		if(a > 2000){
			alert("一次最多只能取2000！");
			return false;
		}else if(!(/^[1-9][0-9]*$/.test(a))){
			alert("您输入的格式不正确，请重新输入！")
			return false;
		}else if(a % 50 != 0){
			alert("只能输入50的倍数！")
			return false;
		}else if((${zhanghu.money})<a){
			alert("余额不足，无法完成取款！")
			return false;
		}else{
			alert("取款成功！")
			return true;
		}
	}
</script>
</head>
<body>
<center>
	<div id="xpz">
	<img alt="" src="beijing/logo.jpg" width="650px" height="180px">
	</div>
	<div id="yjc">
	<form action="Quqian?id=${zhanghu.id}" method="post" name="myForm" onsubmit="return yanz()">
	<h1 style="color:#000000">取款业务</h1>
		<table>		
			<tbody>
				<tr>
					<td>取款金额：</td>
				</tr>
				<tr><td></td></tr>
				<tr>
					<td><input type="text" name="money"></td>
				</tr>
				<tr></tr><tr></tr><tr></tr>
				<tr>
					<td>
						<input type="submit" value="提交">&emsp;
						<input type="reset" value="重置">&emsp;
						<input type="button" value="返回" onclick="window.location='yhwelcome.jsp'">
					</td>				
				</tr>
			</tbody>
		</table>
	</form>
	</div>
</center>
</body>
</html>